package com.xb;

import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

/**
 * @program: register-jerry
 * @description: 线程安全的 CopyOnWriteArrayList
 * @author: xu.bin
 * @create: 2020-11-20
 */
public class CopyOnWriteArrayListDemo {

    static public void main(String []args){
        //线程安全的
        CopyOnWriteArrayList list=new CopyOnWriteArrayList();
        list.add("李四");
        list.get(0);
        list.remove(0);
        System.out.println(list);
    }
}